package me.linkcn.ydtxl.server.data;

import me.linkcn.ydtxl.server.objects.Account;
import me.linkcn.ydtxl.server.objects.Group;

import java.util.List;

/**
 * DAO工厂.
 * User: cmcc
 * Date: 11-8-14
 * Time: 下午9:40
 */
public abstract class DataFacade {
    public abstract Account createAccount(Account account);

    public abstract Account getAccountByLoginPwd(String identifier, char[] secret);

    public abstract int generateGroupIdByAccountName(String accountName);

    public abstract boolean createGroup(Group group);

    public abstract List<Group> getGroupListByAccountName(String accountName);

    public abstract Group getGroupByAccountNameAndGroupName(String accountName, String groupName);

    public abstract boolean deleteGroupByAccountNameAndGroupName(String accountName, String groupName);
}
